package com.dianrui.moonfire.adapter;

import android.support.annotation.Nullable;
import android.view.View;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.dianrui.moonfire.R;
import com.dianrui.moonfire.bean.AreaModel;


import java.util.List;

public class ChooseAddressAdapter extends BaseQuickAdapter<AreaModel,BaseViewHolder> {



    public ChooseAddressAdapter(int layoutResId, @Nullable List<AreaModel> data) {
        super(layoutResId, data);
    }

    @Override
    protected void convert(BaseViewHolder helper, AreaModel bean) {
        helper.setText(R.id.areaname, bean.area_name);
        helper.setText(R.id.price, bean.deposit);
        if (bean.finance_id>0) {
            helper.getView(R.id.refund_failed_layout).setVisibility(View.VISIBLE);
        }else {
            helper.getView(R.id.refund_failed_layout).setVisibility(View.GONE);
        }
        helper.addOnClickListener(R.id.click_despoit_layout);
        helper.addOnClickListener(R.id.withdraw_failed_btn);
    }
}
